Integrand size = 36, antiderivative size = 141 \[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {B (b \cos (c+d x))^{3+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+n}{2},\frac {5+n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^3 d (3+n) \sqrt {\sin ^2(c+d x)}}-\frac {C (b \cos (c+d x))^{4+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+n}{2},\frac {6+n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^4 d (4+n) \sqrt {\sin ^2(c+d x)}} \]
-B*(b*cos(d*x+c))^(3+n)*hypergeom([1/2, 3/2+1/2*n],[5/2+1/2*n],cos(d*x+c)^ 2)*sin(d*x+c)/b^3/d/(3+n)/(sin(d*x+c)^2)^(1/2)-C*(b*cos(d*x+c))^(4+n)*hype rgeom([1/2, 2+1/2*n],[3+1/2*n],cos(d*x+c)^2)*sin(d*x+c)/b^4/d/(4+n)/(sin(d *x+c)^2)^(1/2)
Time = 0.19 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.85 \[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {\cos ^2(c+d x) (b \cos (c+d x))^n \cot (c+d x) \left (B (4+n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+n}{2},\frac {5+n}{2},\cos ^2(c+d x)\right )+C (3+n) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+n}{2},\frac {6+n}{2},\cos ^2(c+d x)\right )\right ) \sqrt {\sin ^2(c+d x)}}{d (3+n) (4+n)} \]
-((Cos[c + d*x]^2*(b*Cos[c + d*x])^n*Cot[c + d*x]*(B*(4 + n)*Hypergeometri c2F1[1/2, (3 + n)/2, (5 + n)/2, Cos[c + d*x]^2] + C*(3 + n)*Cos[c + d*x]*H ypergeometric2F1[1/2, (4 + n)/2, (6 + n)/2, Cos[c + d*x]^2])*Sqrt[Sin[c + d*x]^2])/(d*(3 + n)*(4 + n)))
Time = 0.46 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.03, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {2030, 3042, 3489, 3042, 3227, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 2030 |
\(\displaystyle \frac {\int (b \cos (c+d x))^{n+1} \left (C \cos ^2(c+d x)+B \cos (c+d x)\right )dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{n+1} \left (C \sin \left (c+d x+\frac {\pi }{2}\right )^2+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{b}\) |
\(\Big \downarrow \) 3489 |
\(\displaystyle \frac {\int (b \cos (c+d x))^{n+2} (B+C \cos (c+d x))dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{n+2} \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{b^2}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {B \int (b \cos (c+d x))^{n+2}dx+\frac {C \int (b \cos (c+d x))^{n+3}dx}{b}}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B \int \left (b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{n+2}dx+\frac {C \int \left (b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{n+3}dx}{b}}{b^2}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {-\frac {C \sin (c+d x) (b \cos (c+d x))^{n+4} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+4}{2},\frac {n+6}{2},\cos ^2(c+d x)\right )}{b^2 d (n+4) \sqrt {\sin ^2(c+d x)}}-\frac {B \sin (c+d x) (b \cos (c+d x))^{n+3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+3}{2},\frac {n+5}{2},\cos ^2(c+d x)\right )}{b d (n+3) \sqrt {\sin ^2(c+d x)}}}{b^2}\) |
(-((B*(b*Cos[c + d*x])^(3 + n)*Hypergeometric2F1[1/2, (3 + n)/2, (5 + n)/2 , Cos[c + d*x]^2]*Sin[c + d*x])/(b*d*(3 + n)*Sqrt[Sin[c + d*x]^2])) - (C*( b*Cos[c + d*x])^(4 + n)*Hypergeometric2F1[1/2, (4 + n)/2, (6 + n)/2, Cos[c + d*x]^2]*Sin[c + d*x])/(b^2*d*(4 + n)*Sqrt[Sin[c + d*x]^2]))/b^2
3.3.18.3.1 Defintions of rubi rules used
Int[(Fx_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Simp[1/b^m Int[(b*v) ^(m + n)*Fx, x], x] /; FreeQ[{b, n}, x] && IntegerQ[m]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b Int[(b*Sin[e + f* x])^(m + 1)*(B + C*Sin[e + f*x]), x], x] /; FreeQ[{b, e, f, B, C, m}, x]
\[\int \cos \left (d x +c \right ) \left (\cos \left (d x +c \right ) b \right )^{n} \left (B \cos \left (d x +c \right )+C \left (\cos ^{2}\left (d x +c \right )\right )\right )d x\]
\[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \left (b \cos \left (d x + c\right )\right )^{n} \cos \left (d x + c\right ) \,d x } \]
Timed out. \[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\text {Timed out} \]
\[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \left (b \cos \left (d x + c\right )\right )^{n} \cos \left (d x + c\right ) \,d x } \]
\[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \left (b \cos \left (d x + c\right )\right )^{n} \cos \left (d x + c\right ) \,d x } \]
Timed out. \[ \int \cos (c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int \cos \left (c+d\,x\right )\,{\left (b\,\cos \left (c+d\,x\right )\right )}^n\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right ) \,d x \]